﻿using System;
using DapperExtensions.Mapper;
using ZilLion.Service.Crm.ModelBase.EntityBase.Identity;

namespace ZilLion.Service.WechatService.Domain.WebApiEntity.WechatCardModel
{
    public class AccThrCzYwcore : ResponseResultInfo
    {
        /// <summary>
        ///  CRM操作记录流水号（服务生成）
        /// </summary>
        public string oprsno { get; set; }

        /// <summary>
        ///  微信凭证号
        /// </summary>
        public string cardno { get; set; }

        /// <summary>
        ///  凭证号类型
        /// </summary>
        public short ctype { get; set; }

        /// <summary>
        ///  本地业务生效时间
        /// </summary>
        public DateTime? oprtime { get; set; }

        /// <summary>
        ///  充现金
        /// </summary>
        public decimal oprczxj { get; set; }

        /// <summary>
        ///  充增值
        /// </summary>
        public decimal oprczzz { get; set; }

        /// <summary>
        ///  核算机构id
        /// </summary>
        public int oprskbrid { get; set; }

        /// <summary>
        ///  核算机构名称
        /// </summary>
        public string oprskbrname { get; set; }

        /// <summary>
        ///  支付状态标记。0-未知 1-成功 2-失败
        /// </summary>
        public short tlsjzfbj { get; set; }

        /// <summary>
        ///  支付状态标记。0-未知 1-成功 2-失败
        /// </summary>
        public decimal oprxjye { get; set; }

        /// <summary>
        ///  支付状态标记。0-未知 1-成功 2-失败
        /// </summary>
        public decimal oprzzye { get; set; }
    }

    public class AccThrCzYwcoreMapper : ClassMapper<AccThrCzYwcore>
    {
        public AccThrCzYwcoreMapper()
        {
            Table("#ywcore");
            Map(f => f.tlsjzfbj).Column("tlsjzfbj");
            Map(f => f.oprsno).Column("oprsno");
            Map(f => f.cardno).Column("cardno");
            Map(f => f.ctype).Column("ctype");
            Map(f => f.oprtime).Column("oprtime");
            Map(f => f.oprczxj).Column("oprczxj");
            Map(f => f.oprczzz).Column("oprczzz");
            Map(f => f.oprskbrid).Column("oprskbrid");
            Map(f => f.oprskbrname).Column("oprskbrname");
            Map(f => f.oprxjye).Column("oprxjye");
            Map(f => f.oprzzye).Column("oprzzye");
        }
    }
}
